package model

import (
	"time"

	"gorm.io/gorm"
)

// Unit 计量单位模型
type Unit struct {
	ID        uint           `json:"id" gorm:"primaryKey"`
	CreatedAt time.Time      `json:"createdAt"`
	UpdatedAt time.Time      `json:"updatedAt"`
	DeletedAt gorm.DeletedAt `json:"deletedAt" gorm:"index"`

	Name   string `json:"name" gorm:"type:varchar(50);not null;comment:单位名称"`
	Code   string `json:"code" gorm:"type:varchar(20);uniqueIndex;not null;comment:单位编码"`
	Status int    `json:"status" gorm:"type:tinyint;default:1;comment:状态 1-启用 0-禁用"`
	Remark string `json:"remark" gorm:"type:varchar(200);comment:备注"`
}
